HighlightText or setSearchObject Function in DXL

Hello All!

Can anybody please help me.I want to highlight some objects found as a result of search.I want to highlight those objects either through highlightText() or setSearchObject() functions.On running both options I get the same error "Incorrectly Concatenated Tokens" and "undeclared variable highlightText()/setSearchObject()".I am working on DOORS 8.0. Does DOORS 8.0 not include both these functions ?

Please suggest me how to highlight those objects in any way either changing the color of Object Heading or changing the background color of the object.

Thanks in anticipation.
MF2G_qaus_qazah - Wed Apr 18 05:25:48 EDT 2012

Re: HighlightText or setSearchObject Function in DXL
llandale - Wed Apr 18 11:05:21 EDT 2012

You have a syntax error, post the code.

Re: HighlightText or setSearchObject Function in DXL
MF2G_qaus_qazah - Fri Apr 20 06:34:39 EDT 2012

Thanks for your answer

Here is the code snippet:

string reqID=""
string oh=""
Object o=null
int objHdgLen=0
Module mod=current
for o in mod do
{
reqID=o."Req ID"
if(reqID == "TS-GR-001")
{
oh=o."Object Heading"
objHdgLen=length(oh)
highlightText(o,0, objHdgLen, 1, true)
}
}

Re: HighlightText or setSearchObject Function in DXL
llandale - Fri Apr 20 11:49:42 EDT 2012

I see these commands in the v8.3.0.0 doors.exe:

bool     highlightText(Object, int iStartSelect, int iStopSelect, int columnSelect , bool isHeading)
void    setSearchObject(Object,int)
.. also ..
Object  getSearchObject(Module, int&)
void    clearSearchObject(Object)
void    clearSearchObject(Module)


I don't see "setSearchObject" in your snippette. Your snippette seems to use highlightText correctly.

-Louie